Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve playlist counts #29381

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Feb 28, 2025

  • make the out put a little clearer for debugging since this isn't released yet
  • also include whether the value increased
  • and how many are unwatched
  • refactor the data we're passing around a little
  • improve the logging of errors so we can see the failing filters/queries to use as test cases

Copy link
Contributor

github-actions bot commented Feb 28, 2025

Size Change: 0 B

Total Size: 9.73 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 9.73 MB

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

id_list = count_data.get("session_ids", None)
recordings_counts["query_count"] = len(id_list) if id_list else 0
recordings_counts["has_more"] = count_data.get("has_more", False)
id_list: list[str] = count_data.get("session_ids", None)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

messy, but wrapped in a try/catch and only here so we can validate behind a flag

@pauldambra pauldambra marked this pull request as ready for review March 1, 2025 13:14
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR enhances the session recording playlist counts feature with more detailed information and improved debugging capabilities.

  • Added recordings_counts structure in frontend/src/types.ts with separate interfaces for collection and saved filters counts, including watched counts and increase indicators
  • Updated mock data in recording_playlists.ts to include the new count structure with watched/unwatched information
  • Enhanced tooltip display in SavedSessionRecordingPlaylists.tsx with tabular format showing both total and unwatched counts
  • Renamed _current_user_viewed to current_user_viewed in session_recording_api.py to make it publicly accessible
  • Improved error logging in recordings_that_match_playlist_filters.py by adding playlist short IDs and filter information
  • Added visual indicator (up arrow) when saved filters count has increased

9 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Comment on lines +201 to +202
"filters": playlist.filters if playlist else None,
"query": query,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most important change here is grabbing these failing filters/queries so we can figure out the transformations the FE is doing that the BE is missing

@pauldambra pauldambra requested a review from veryayskiy March 2, 2025 12:45
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

@veryayskiy veryayskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, there are many that didn't calculate and were not picked up again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants